﻿
#ifndef IFORMATPANEL_H
#define IFORMATPANEL_H

#include "formatpanelglobal.h"
#include <QWidget>
#include <QString>


struct FormatStyle 
{
	QString name;
	QString fontFamily;
	int fontSize;
	bool bold;
	bool italic;
	bool underline;
	bool strikethrough;
	QString color;
	QString backgroundColor;
};

class FORMATPANEL_EXPORT IFormatPanel
{
public:
	virtual ~IFormatPanel() = default;

	virtual QWidget* widget() = 0;

	virtual void addStyle(const FormatStyle& style) = 0;
	virtual void updateStyle(const QString& name, const FormatStyle& style) = 0;
	virtual void removeStyle(const QString& name) = 0;
	virtual void clearStyles() = 0;

	virtual void setCurrentStyle(const QString& name) = 0;
	virtual QString currentStyle() const = 0;
	virtual FormatStyle getStyle(const QString& name) const = 0;
	virtual void syncRibbonState(
		const QString& fontFamily,
		int fontSize,
		bool bold,
		bool italic,
		bool underline
	) = 0;

};

#endif // IFORMATPANEL_H